// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import resource from 'vue-resource'
import VueCookie from 'vue-cookie'
import $config from './assets/global.js'
import './assets/lib/js/flexible.js'
// import 'jquery'
// import './assets/lib/js/jquery.cookie.js'

Vue.use(resource)
Vue.use($config)
Vue.use(VueCookie)
Vue.http.options.emulateJSON = true;
/* eslint-disable no-new */

new Vue({
    el: '#app',
    router,
    template: '<App/>',
    components: {App},
    mounted () {
        var wxname = this.$cookie.get('wx_h5_wxuid');
        if (!wxname) {
            // location.href = 'http://h5.oeeee.com/index.php?s=/EyesDsj/auth';
        } else {
            this.$config.init();
        }
    }
})
